package com.example.lotterysystem.common.enums;

import lombok.Getter;

@Getter
public enum ActivityStatusEnum {

    RUNNING(1, "活动进行中"), COMPLETED(2, "活动已完成");

    ActivityStatusEnum(){

    }

    ActivityStatusEnum(Integer code, String status){
        this.code = code;
        this.status = status;
    }
    private Integer code;
    private String status;

    public static ActivityStatusEnum forName(String name){
        for (ActivityStatusEnum activityStatusEnum : ActivityStatusEnum.values()) {
            if(activityStatusEnum.name().equalsIgnoreCase(name)){
                return activityStatusEnum;
            }
        }
        return null;
    }
}
